<?php 
include ( PATH . '/includes/common_header.php' );
include ( PATH . '/templates/' . $cookie_template . '/tables.php'); 

if (isset($initiate_maps) && $initiate_maps == 'ON') {
 include(PATH . '/includes/functions/maps.php');
 $map = new Map();
 $map->setAPIKey($conf['google_key']);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="<?php echo $lang['Direction']; ?>">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $lang['Encoding']; ?>" />
 <meta http-equiv="Content-Style-Type" content="text/css" />
 <meta name="author" content="phpMyRealty.com" />
 <meta name="copyright" content="Copyright, phpMyRealty.com. All rights reserved." />

 <meta name="title" content="<?php if (isset($meta_title)) echo $meta_title; else echo $conf['title_meta']; ?>" />
 <meta name="description" content="<?php if (isset($meta_description)) echo $meta_description; else echo $conf['description_meta']; ?>" />
 <meta name="keywords" content="<?php if (isset($meta_keywords)) echo $meta_keywords; else echo $conf['keywords_meta']; ?>" />

 <meta name="robots" content="<?php echo $conf['robots_meta']; ?>" />
 <meta name="revisit-after" content="7 days" />
 <link rel="stylesheet" href="<?php echo URL . '/templates/' . $cookie_template . '/style.css'; ?>" type="text/css" />
 <link rel="stylesheet" href="<?php echo URL . '/templates/' . $cookie_template . '/tabcontent.css'; ?>" type="text/css" />
 <link rel="stylesheet" href="<?php echo URL; ?>/includes/lightbox/css/lightbox.css" type="text/css" />
 <link rel="stylesheet" href="<?php echo URL; ?>/includes/dhonishow/dhonishow.css" type="text/css" media="screen" />
 <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo URL . '/rss.php'; ?>" />
<?php
 include ( PATH . '/includes/js.php' );
 if (isset($initiate_maps) && $initiate_maps == 'ON') {
   $map->printGoogleJS();
 }
 if (isset($initAjax) && $initAjax)
  $xajax->printJavascript(); 
?>
 <title><?php echo $title; ?></title>
</head>
<body <?php if (isset($onload)) echo $onload; ?>>
<!-- Header : start -->

<div id="wrap">
 <div id="header">
  <span class="headerTitle"><?php echo $conf['website_name_short']; ?></span><br /><br />
  <?php include (PATH . '/templates/' . $cookie_template . '/menu2.php'); ?>
 </div>
 <div id="sidebar">
  <?php if (!isset($_SESSION['login'])) include (PATH . '/templates/' . $cookie_template . '/login.php'); ?>
  <?php
  
  // If quick search is enabled
  if ($conf['quick_search'] == 'ON')
  	include (PATH . '/templates/' . $cookie_template . '/searchform.php');
  	
  ?>
  <?php include (PATH . '/templates/' . $cookie_template . '/menu.php'); ?>
  <?php
  
  // If settings box is enabled
  if ($conf['settings_box'] == 'ON')
  	include (PATH . '/options.php');
  
  ?>
  <?php
  
  // If agents' online is enabled
  if ($conf['online_box'] == 'ON')
  	include (PATH . '/online.php'); 
  
  ?>
 </div>
 <div id="content">
  <?php include ( PATH . '/banner.php' ); ?>
<!-- Header : stop -->
<!-- Main Content table : start -->